package org.javaboy.stream_old_version.msg;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;

//@EnableBinding(Sink.class)
@EnableBinding(MyChannel.class)
public class MsgReceiver {

    // 接收消息
//    @StreamListener(Sink.INPUT)
    @StreamListener(MyChannel.INPUT)
    public void receiveInput(String msg) {
        System.out.println("接收到的消息是：" + msg);
    }
}
